home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group96a.txt
/
000132_icon-group-sender _Tue Jun 11 01:03:56 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1996-09-05
|
2KB
Received: by cheltenham.cs.arizona.edu; Wed, 12 Jun 1996 09:00:07 MST
To: icon-group@cs.arizona.edu
Date: Tue, 11 Jun 1996 01:03:56 GMT
From: beatty@netcom.com (Derek Lee Beatty)
Message-Id: <4pigls$1kq@beatty.slip.netcom.com>
Organization: none
Sender: icon-group-request@cs.arizona.edu
References: <199606071540.LAA18004@morgoth>, <4pa3hq$lpc@labrador.cs.purdue.edu>, <4pd03h$g3o@lectura.CS.Arizona.EDU>
Subject: Re: m3 should have SWAP(a,b)
Errors-To: icon-group-errors@cs.arizona.edu
Status: O
dave@CS.Arizona.EDU (Dave Schaumann) wrote:
>For my part, the only time I've found 'swap' to be a useful
>operation is when I am writing sort algorithm (or sort-related algorithms,
>like heap manipulation). Since (in my experience, anyway) this is not a
>frequent occurrance, it doesn't seem like the best idea in the world to
>include 'swap' as part of any language's basic repetoir of operations.
>
>Perhaps others have found a more extensive use for swapping?
>
I've found SWAP useful in VLSI circuit analysis. I suspect other domains
where the natural representation is nearly a graph might be similar.
I'd expect that once you decide to include SWAP, generalizing to multiple
assignment might be worthwhile. Perhaps after the right-hand sides are
evaluated, all the left-hand sides could be updated atomically? (I'm just
guessing here; perhaps that would complicate the runtime unnecessarily.)
--
Derek Lee Beatty _ Death
beatty@netcom.com _| ~-, Taxes
Austin, Texas \, * } C++
\_(